﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace Qiang.Geometry
{
    public class MultiPoint :GeometryCollection,IMultiPoint
    {

        #region 初始化


        #endregion


        #region IMultiPoint成员

        IPoint[] _geometries;

        /// <summary>
        /// 
        /// </summary>
        public new IPoint[] Geometries
        {
            get { return _geometries; }
            set { _geometries = value; }
        }


        #endregion


        #region Geometry成员

        /// <summary>
        /// 几何类型
        /// </summary>
        public override GeometryType GeometryType
        {
            get { return GeometryType.MultiPoint; }
        }

        /// <summary>
        /// 
        /// </summary>
        public override int Dimension
        {
            get { throw new NotImplementedException(); }
        }


        /// <summary>
        /// 点数量。
        /// </summary>
        public new int NumGeometries
        {
            get { return _geometries.Length; }
        }

        /// <summary>
        /// 坐标集合。
        /// </summary>
        public override IList<Coordinate> Coordinates
        {
            get
            {
                IList<Coordinate> coors = new List<Coordinate>();
                foreach (IPoint point in _geometries)
                {
                    coors.Add(point.Coordinate);
                }
                return coors;
            }
            set
            {
                if (value == null) return;
                _geometries = new Point[value.Count];
                for(int i=0;i<value.Count;i++)
                {
                    _geometries[i] = new Point(value[i]);                    
                }
            }
        }
        
        /// <summary>
        /// 是否为空。
        /// </summary>
        public override bool IsEmpty
        {
            get 
            {               
                return true;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        public override bool IsSimple
        {
            get { throw new NotImplementedException(); }
        }

        #endregion


        #region 方法

    

        #endregion


        #region SQL


        public override string AsText()
        {
            throw new NotImplementedException();
        }

        public override byte[] AsBinarry()
        {
            throw new NotImplementedException();
        }


        #endregion

    }
}
